/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kmcsoft.goldshop.shop;

import com.kmcsoft.emaster.entity.Employee;
import com.kmcsoft.goldshop.shop.service.ShopService;
import com.kmcsoft.spring.SpringUtil;
import org.zkoss.zk.ui.Component;
import org.zkoss.zkplus.databind.TypeConverter;

/**
 *
 * @author kmcsoft02
 */
public class BoothCodeConverter implements TypeConverter {

    ShopService service;

    public Object coerceToUi(Object val, Component comp) {
        service = SpringUtil.getBean("shopService", ShopService.class);
        return service.getBoothCodeByEmployee((Employee)val);

    }

    public Object coerceToBean(Object val, Component comp) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
